package com.ziq.baselib.test.hilt

import android.content.Context
import android.os.Bundle
import android.util.AttributeSet
import android.view.View
import android.view.ViewGroup
import com.ziq.base.base.BaseActivity
import com.ziq.base.extension.binding
import com.ziq.baselib.R
import com.ziq.baselib.databinding.ActivityFragmentHiltBinding
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class HiltFragmentActivity: BaseActivity() {

    private val binding : ActivityFragmentHiltBinding by binding()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding.root
        supportFragmentManager.beginTransaction()
            .add(HiltFragment(), "HiltFragment")
            .commit()
        binding.root.postDelayed({
            supportFragmentManager.findFragmentByTag("HiltFragment")?.view?.also {
                binding.fragmentContainerView.addView(it)
            }
        }, 5000)

    }
}